flowbox: Remove unneeded checks
authorBenjamin Otte <otte@redhat.com>
Wed, 30 Apr 2014 06:41:54 +0000 (08:41 +0200)
committerBenjamin Otte <otte@redhat.com>
Thu, 1 May 2014 12:51:27 +0000 (14:51 +0200)
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.

gtk/gtkflowbox.c

index 6979f6a4bcf373ca946202eb710188a013af89cd..9a03ec36d999fcc786b3715582377c7fb8e3c25d 100644 (file)
@@ -434,10 +434,8 @@ gtk_flow_box_child_get_preferred_height_for_width (GtkWidget *widget,
         gtk_widget_get_preferred_height_for_width (child, width - full_border.left - full_border.right,
                                                    &child_min, &child_natural);
 
-      if (minimum_height)
-        *minimum_height = full_border.top + child_min + full_border.bottom;
-      if (natural_height)
-        *natural_height = full_border.top + child_natural + full_border.bottom;
+      *minimum_height = full_border.top + child_min + full_border.bottom;
+      *natural_height = full_border.top + child_natural + full_border.bottom;
     }
   else
     {
@@ -461,10 +459,8 @@ gtk_flow_box_child_get_preferred_width (GtkWidget *widget,
       if (child && gtk_widget_get_visible (child))
         gtk_widget_get_preferred_width (child, &child_min, &child_natural);
 
-      if (minimum_width)
-        *minimum_width = full_border.left + child_min + full_border.right;
-      if (natural_width)
-        *natural_width = full_border.left + child_natural + full_border.right;
+      *minimum_width = full_border.left + child_min + full_border.right;
+      *natural_width = full_border.left + child_natural + full_border.right;
     }
   else
     {
@@ -498,10 +494,8 @@ gtk_flow_box_child_get_preferred_width_for_height (GtkWidget *widget,
         gtk_widget_get_preferred_width_for_height (child, height - full_border.top - full_border.bottom,
                                                    &child_min, &child_natural);
 
-      if (minimum_width)
-        *minimum_width = full_border.left + child_min + full_border.right;
-      if (natural_width)
-        *natural_width = full_border.left + child_natural + full_border.right;
+      *minimum_width = full_border.left + child_min + full_border.right;
+      *natural_width = full_border.left + child_natural + full_border.right;
     }
 }
 
@@ -529,10 +523,8 @@ gtk_flow_box_child_get_preferred_height (GtkWidget *widget,
       if (child && gtk_widget_get_visible (child))
         gtk_widget_get_preferred_height (child, &child_min, &child_natural);
 
-      if (minimum_height)
-        *minimum_height = full_border.top + child_min + full_border.bottom;
-      if (natural_height)
-        *natural_height = full_border.top + child_natural + full_border.bottom;
+      *minimum_height = full_border.top + child_min + full_border.bottom;
+      *natural_height = full_border.top + child_natural + full_border.bottom;
     }
 }